package client.application;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;

import remote.calculator.Calculator;


public class ClientApp {


	private static final String SHOULD = " should be ";

	public static void main(String[] args) throws MalformedURLException, RemoteException, NotBoundException {
		Calculator calculator = (Calculator) Naming.lookup("//localhost/Calculator");
		
		System.out.println(calculator.add(1.25, 1.125) + SHOULD + (1.25 + 1.125));
		System.out.println(calculator.sub(1.25, 1.125) + SHOULD + (1.25 - 1.125));
		System.out.println(calculator.mul(1.25, 1.125) + SHOULD + (1.25 * 1.125));
		System.out.println(calculator.div(2.25, 1.125) + SHOULD + (2.25 / 1.125));
	}

}
